﻿<%@ Page Title="Sms Mt Statistics" Language="C#" MasterPageFile="~/App_MasterPages/Aquarius.Master"
    AutoEventWireup="true" CodeBehind="SmsMtStatistics.aspx.cs" Inherits="PanasonicWarranty.UI.SmsMtStatistics"
    EnableEventValidation="false" %>

<%@ Register Src="UserControl/ucPaging.ascx" TagName="ucPaging" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CssContent" runat="server">
    <style type="text/css">
        #searching span
        {
            width: 160px;
            display: inline-block;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=txtFromDate.ClientID%>").datepicker();
            $("#<%=txtToDate.ClientID%>").datepicker();
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row-fluid">
        <div class="span12">
            <div class="head">
                <div class="isw-grid">
                </div>
                <h1>
                    Searching</h1>
                <div class="clear">
                </div>
            </div>
            <div class="block-fluid" style="padding: 10px 0px 5px 10px">
                <table width="100%" cellspacing="0" cellpadding="0" class="">
                    <tbody>
                        <tr>
                            <td>
                                Short Code
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlShortCode" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Phone Number
                            </td>
                            <td>
                                <asp:TextBox ID="txtPhoneNumber" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Sent time
                            </td>
                            <td>
                                <asp:TextBox ID="txtFromDate" runat="server" />
                                To
                                <asp:TextBox ID="txtToDate" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Status
                            </td>
                            <td>
                                <asp:TextBox ID="txtStatus" runat="server" />
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div style="text-align: center">
                    <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click"
                        CssClass="btn" />
                </div>
            </div>
        </div>
    </div>
    <asp:UpdatePanel ID="udpn" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <div class="row-fluid">
                <div class="span12">
                    <div class="head">
                        <div class="isw-grid">
                        </div>
                        <h1>
                            Statistic</h1>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="block-fluid table-sorting">
                        <div role="grid" class="dataTables_wrapper" id="tSortable_wrapper">
                            <div id="tSortable_length" class="dataTables_length">
                                <label>
                                    Show
                                    <asp:DropDownList ID="tSortable_length" size="1" aria-controls="tSortable" runat="server"
                                        OnSelectedIndexChanged="tSortable_length_SelectedIndexChanged" AutoPostBack="true">
                                        <asp:ListItem Value="5">5</asp:ListItem>
                                        <asp:ListItem Value="10">10</asp:ListItem>
                                        <asp:ListItem Value="25">25</asp:ListItem>
                                        <asp:ListItem Value="50" Selected="True">50</asp:ListItem>
                                        <asp:ListItem Value="100">100</asp:ListItem>
                                    </asp:DropDownList>
                                    entries</label>
                            </div>
                            <div>
                                <uc1:ucPaging ID="pagingtop" runat="server" />
                            </div>
                            <table cellpadding="0" cellspacing="0" width="100%"
                                id="tbStatistic" class="table dataTable" aria-describedby="tSortable_info">
                                <thead>
                                    <tr>
                                        <th>
                                            No
                                        </th>
                                        <th style="width: 100px">
                                            Short Code
                                        </th>
                                        <th style="width: 120px">
                                            Phone Number
                                        </th>
                                        <th>
                                            Message
                                        </th>
                                        <th style="width: 180px">
                                            Sent Time
                                        </th>
                                        <th style="width: 80px">
                                            Status
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="rptStatistic" runat="server" OnItemCreated="rptStatistic_ItemCreated"
                                        EnableViewState="false">
                                        <ItemTemplate>
                                            <tr runat="server" id="itemRow">
                                                <td align="center" style="width: 30px">
                                                    <%#(Container.ItemIndex +1) + (pagingtop.CurrentPage - 1) * pagingtop.PageSize %>
                                                </td>
                                                <td>
                                                    <%#Eval("ShortCode")%>
                                                </td>
                                                <td>
                                                    <%#Eval("DestAddr")%>
                                                </td>
                                                <td>
                                                    <%#Eval("Message")%>
                                                </td>
                                                <td>
                                                    <%#Convert.ToDateTime(Eval("SentTime")).ToString("MM/dd/yyyy HH:mm:ss")%>
                                                </td>
                                                <td>
                                                    <%#Eval("Status")%>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                            <div class="dataTables_info" id="tSortable_info">
                                <asp:Literal ID="ltrInfo" runat="server" />
                            </div>
                            <div class="dataTables_paginate paging_full_numbers" id="tSortable_paginate">
                                <uc1:ucPaging ID="pagingbottom" runat="server" />
                            </div>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="udprogress" DisplayAfter="1" runat="server">
        <ProgressTemplate>
            <div class="ui-widget-overlay ui-front">
                <img src="images/loading.gif" alt="Loading..." style="position: fixed; top: 50%;
                    left: 50%" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <input type="hidden" id="formId" value="SmsMtStatistics" />
</asp:Content>
